# -*- coding: utf-8 -*-
# @author: wch
# @file: rotate.py
# @time: 2023/2/9 16:41

# rotate 旋转
# rotate（img，rotateCode)
# ROTATE_90_CLOCKWISE  顺时针90
# ROTATE_180           顺时针180
# ROTATE_90_COUNTERCLOCKWISE

import cv2
import numpy as np

img = cv2.imread(r"E:\code\opencv\media\2.jpg")
new = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE)
new2 = cv2.rotate(img,cv2.ROTATE_180)
new3 = cv2.rotate(img,cv2.ROTATE_90_COUNTERCLOCKWISE)

cv2.imshow("new",new)
cv2.imshow("img",img)
cv2.waitKey(0)
cv2.destroyAllWindows()
